package com.myapp.api.tools;

public enum  ResultStatus {
    /** 成功 */
    SUCCESS(200, "Success !!!"),

    /** 没有登录 */
    NOT_LOGIN(401, "Unauthorized !!!"),

    /** 不存在 TOKEN */
    NOT_EXIST_TOKEN(401, "Token does not exist !!!"),

    /**
     * TOKEN 过期
     */
    TOKEN_EXPIRED(401, "Token expired !!!"),

    /** 被禁止 */
    FORBIDDEN(403, "Forbidden!!!"),

    /** 未找到资源 */
    NOT_FOUND(404, "Not Found !!!"),

    /** 网关错误 **/
    BAD_GATEWAY(405, "Bad Gateway !!!"),

    /** 参数错误 */
    PARAMS_ERROR(422, "Parameter error !!!"),

    /** 服务器发生错误 **/
    SERVER_ERROR(500, "Server error !!!"),

    /** 添加数据时发生错误 **/
    ADD_DATA_ERROR(500, "Add Data is Error !!!"),

    /** 修改数据时发生错误 **/
    UPDATE_DATA_ERROR(500, "Update Data is Error !!!"),

    /** 删除数据时发生错误 **/
    DELETE_DATA_ERROR(500, "Delete Data is Error !!!")
    ;
    private int status;

    private String message;

    ResultStatus(int status, String message) {
        this.status = status;
        this.message = message;
    }

    public int getStatus() {
        return status;
    }

    public String getMessage() {
        return message;
    }
}
